unit LiveMain;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Grids, DBGrids, DB, IfxCustomDataSet, IfxTable, IfxConnection,
  DBClient, Provider, StdCtrls, IfxQuery, IfxNativeFields, IfxFieldTypes,
  IfxConvert;

type
  TForm1 = class(TForm)
    IfxConnection1: TIfxConnection;
    IfxTable1: TIfxTable;
    DataSource1: TDataSource;
    DBGrid1: TDBGrid;
    DataSetProvider1: TDataSetProvider;
    ClientDataSet1: TClientDataSet;
    Button1: TButton;
    IfxQuery1: TIfxQuery;
    IfxFieldTypes1: TIfxFieldTypes;
    btn1: TButton;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure IfxTable1address2Validate(Sender: TField);
    procedure IfxTable1fnameValidate(Sender: TField);
    procedure IfxTable1phoneValidate(Sender: TField);
    procedure IfxTable1customer_numValidate(Sender: TField);
    procedure btn1Click(Sender: TObject);
    procedure IfxTable1CalcFields(DataSet: TDataSet);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses IfxIntf;

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  //ifx_var_freevar := nil;
  IfxTable1.FieldDefs.HiddenFields := True;
  IfxTable1.Open;
  //IfxQuery1.Open;
  //ClientDataSet1.Open;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  //ClientDataSet1.ApplyUpdates(0);
  IfxTable1.ApplyUpdates;
end;

procedure TForm1.IfxTable1address2Validate(Sender: TField);
begin
//
end;

procedure TForm1.IfxTable1fnameValidate(Sender: TField);
begin
//
  ShowMessage(Sender.AsString);
end;

procedure TForm1.IfxTable1phoneValidate(Sender: TField);
begin
//
end;

procedure TForm1.IfxTable1customer_numValidate(Sender: TField);
begin
  Abort;
end;

procedure TForm1.btn1Click(Sender: TObject);
begin
  ShowMessage(DBGrid1.SelectedField.NewValue);
end;

procedure TForm1.IfxTable1CalcFields(DataSet: TDataSet);
begin
//  IfxTable1calcdec.Value := Int64ToDecimal(13123312231312);
  //IfxTable1calcdt.Value := DTimeCurrent(IfxTable1calcdt.Size);
end;

end.
